﻿using Avalonia;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FantomNext.Helpers
{
    public static class RectHelper
    {
        public static Rect CreateRect(Point point1, Point point2)
        {
            var left = Math.Min(point1.X, point2.X);
            var right = Math.Max(point1.X, point2.X);
            var top = Math.Min(point1.Y, point2.Y);
            var bottom = Math.Max(point1.Y, point2.Y);
            return new Rect(left, top, right - left, bottom - top);
        }

    }
}
